﻿@{
    Layout = null;
}
<div class="panel-body" style="padding:0">
    <div class="panel panel-default">
        <div class="panel-heading"></div>
        <div class="panel-body">
            <form id="formSearch" class="form-horizontal">
                <div class="form-group">
                    <label class="control-label" for="nickname_search">用户名:</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" id="nickname_search" placeholder="请您输入用户名">
                    </div>
                    <label class="control-label" for="merchantname_search">商户名称:</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" id="merchantname_search" placeholder="请您输入商户名称">
                    </div>
                    <label class="control-label" for="joinmark_search">营业:</label>
                    <div class="col-sm-2">
                        <select class="form-control" id="joinmark_search">
                            <option value="-1">全部</option>
                            <option value="0">未营业</option>
                            <option value="1">营业中</option>
                        </select>
                    </div>
                    <div class="col-sm-3">
                        <button type="button" id="btnQueryList" class="btn btn-primary"><i class="fa fa-search"></i>查询</button>
                        <button type="button" id="btnReset" class="btn btn-primary"><i class="fa fa-remove"></i>清空</button>
                    </div>
                </div>
            </form>
            <hr />
            <div>
                <table id="merchantinfo"></table>
            </div>
        </div>
    </div>
</div>

<div id="toolbar" class="btn-group">
    <button id="btnReceivables" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>商户收款方式</span></button>
    <button id="btnBusinessActivities" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>查看活动</span></button>
    <button id="btnProductCategory" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>商户产品分类</span></button>
    <button id="btnDetail" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>详情</span></button>
    <button id="btnDeleteDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>删除</span></button>
</div>

@*查看商户收款方式*@
<div class="modal fade" id="QueryReceivables" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width:70%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle_Receivables">商户收款方式</h4>
            </div>
            <div class="modal-body">
                <form id="QueryReceivablesOperation" method="get" class="form-horizontal">
                    <div class="tab-pane" id="QueryReceivablesTable" style="display:none">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th>收款方式</th>
                                    <th>开户行</th>
                                    <th>开户名</th>
                                    <th>开户帐号</th>
                                    <th>第三方帐号</th>
                                    <th>默认</th>
                                    <th>创建时间</th>
                                </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                    <div id="QueryReceivablesTableNo">
                        <h3 style="color:red;text-align: center;"><i class="fa fa-exclamation-triangle"></i> 该商户还未设置收款方式！</h3>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>关闭</button>
            </div>
        </div>
    </div>
</div>

@*查看商户活动*@
<div class="modal fade" id="QueryBusinessActivities" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle_BusinessActivities">商户活动</h4>
            </div>
            <div class="modal-body">
                <form id="QueryBusinessActivitiesOperation" method="get" class="form-horizontal">
                    <div class="tab-pane" id="QueryBusinessActivitiesTable" style="display:none">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th>活动类别</th>
                                    <th>活动标签</th>
                                    <th>活动内容</th>
                                    <th>活动排序</th>
                                    <th>创建时间</th>
                                </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                    <div id="QueryBusinessActivitiesTableNo">
                        <h3 style="color:red;text-align: center;"><i class="fa fa-exclamation-triangle"></i> 该商户还未设置活动方式！</h3>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>关闭</button>
            </div>
        </div>
    </div>
</div>

@*查看商户产品分类*@
<div class="modal fade" id="QueryProductCategory" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle_ProductCategory">商户产品分类</h4>
            </div>
            <div class="modal-body">
                <form id="ProductCategoryOperation" method="get" class="form-horizontal">
                    <div class="tab-pane" id="ProductCategoryTable" style="display:none">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th>分类名称</th>
                                    <th>分类排序</th>
                                    <th>创建时间</th>
                                    <th>是否启用</th>
                                </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                    <div id="ProductCategoryTableNo">
                        <h3 style="color:red;text-align: center;"><i class="fa fa-exclamation-triangle"></i> 该商户还未设置产品分类！</h3>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>关闭</button>
            </div>
        </div>
    </div>
</div>

@*订单详情*@
<div class="modal fade" id="DetailModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width:50%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">订单信息详情</h4>
            </div>
            <div class="modal-body">
                <form id="MerchantDetail" class="form-horizontal">
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">用户名:</span>
                            <input type="text" id="detail_nickname" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">平台分类名称:</span>
                            <input type="text" id="detail_platformname" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户名称:</span>
                            <input type="text" id="detail_name" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">商户电话:</span>
                            <input type="text" id="detail_phone" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户营业开始时间:</span>
                            <input type="text" id="detail_businessstarthours" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">结束时间:</span>
                            <input type="text" id="detail_businesssendhours" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">营业:</span>
                            <input type="text" id="detail_joinmark" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">配送费:</span>
                            <input type="text" id="detail_distributionfee" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">商户创建时间:</span>
                            <input type="text" id="detail_createtime" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户公告:</span>
                            <input type="text" id="detail_notice" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户地址:</span>
                            <input type="text" id="detail_address" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户Logo:</span>
                            <div style="float: left;border: 1px solid #CAC3C3;background: #FFFFFF;margin-left: 20px;box-shadow: 5px 5px 5px #777575;">
                                <img id="detail_logo" style="width:120px;height:80px" />
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@*删除*@
<div class="modal fade" id="DelMerchantModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">商户：(<span id="Delete_Head_Title">***</span>)删除确认页面</h4>
            </div>
            <div class="modal-body">
                <form id="DelMerchantOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="delete_id" name="delete_id" />
                    <div class="form-group">
                        <div class="input-group">
                            您确认要删除商户（<span id="Delete_Head_Title_OK">***</span>)吗？
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnDeleteOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

<script src="~/Scripts/project/min/merchant.min.js"></script>
<script type="text/javascript">
    $(function () {
        ml.admin.merchant.init();
    })
</script>